package com.yanqu.road.server.cmd.activity.yearMaster;


import com.yanqu.road.pb.yearMaster.YearMasterProto;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.command.Command;
import com.yanqu.road.server.manger.activity.yearMaster.YearMasterMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;
import io.netty.channel.ChannelHandlerContext;


@Cmd(code = Protocol.S_CROSS_ACTIVITY_YEAR_MASTER_BOSS_SYNC, desc = "年兽活动同步boss信息")
public class CrossActivityYearMasterSyncCmd implements Command {

    @Override
    public void execute(ChannelHandlerContext ctx, YanQuMessage packet) throws Exception {
        YearMasterProto.YearMasterNotifyInfo info = YearMasterProto.YearMasterNotifyInfo.parseFrom(packet.getBytes());
        YearMasterMgr.updateBossInfo(info.getBossInfo(), true);
    }
}
